package com.zhou.JavaAndroidFirm.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author Administrator
 * @date 2018/7/20 0020
 * @des 服务器公用返回类
 */
public class CommonResponse implements Parcelable {
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private String status;
    private String msg;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.status);
        dest.writeString(this.msg);
    }

    public CommonResponse(String status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public CommonResponse() {
    }

    protected CommonResponse(Parcel in) {
        this.status = in.readString();
        this.msg = in.readString();
    }

    public static final Parcelable.Creator<CommonResponse> CREATOR = new Parcelable.Creator<CommonResponse>() {
        @Override
        public CommonResponse createFromParcel(Parcel source) {
            return new CommonResponse(source);
        }

        @Override
        public CommonResponse[] newArray(int size) {
            return new CommonResponse[size];
        }
    };

    @Override
    public String toString() {
        return "CommonResponse{" +
                "status='" + status + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
